﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PresupuestoListForm.aspx.cs"
 Inherits="UILGestion.ObraAdmin.Presupuesto.PresupuestoListForm" %>

<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc2" %>

<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="cc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


<%@ Register src="~/Control/menuObraCtrl.ascx" tagname="menuObraCtrl" tagprefix="uc1" %>

<%@ Register src="~/ObraAdmin/Presupuesto/PresupuestoListGrid.ascx" tagname="PresupuestoListGrid" tagprefix="uc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="~/css/main.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="~/estilos/_common/styles/fonts.css" />
 <link rel="stylesheet" type="text/css" href="~/estilos/_common/styles/global.css" />
 <link rel="stylesheet" type="text/css" href="~/estilos/_common/styles/theme.css" />
    <title></title>

    <style type="text/css">

p.MsoTitle
	{margin-bottom:.0001pt;
	text-align:center;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;
	        margin-left: 0cm;
            margin-right: 0cm;
            margin-top: 0cm;
        }
    </style>

</head>
 <script type="text/javascript" language="javascript">

     function uploadError(sender, args) {
         document.getElementById('lblStatus').innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
     }

     function StartUpload(sender, args) {
         document.getElementById('lblStatus').innerText = 'Carga Iniciada.';
     }

     function UploadComplete(sender, args) {
         var filename = args.get_fileName();
         var contentType = args.get_contentType();
         //var text = "Tamaño de " + filename + " es " + args.get_length() + " bytes";
         var text = "Tamaño :" + args.get_length() + " bytes";

         if (contentType.length > 0) {
             text += " Tipo :'" + contentType + "'.";
         }
         document.getElementById('lblStatus').innerText = text;
     }
    </script>
<body>
    <form id="form1" runat="server" autocomplete="off">
   
       <cc1:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"  EnablePartialRendering="true" EnableScriptGlobalization="true">
    </cc1:ToolkitScriptManager>
    <uc1:menuObraCtrl ID="menuObraCtrl1" runat="server" />

 <asp:Panel ID="pnlMain" runat="server" 
      CssClass="Heading secTitle AreaHeading ms-crm-List-Header " >
  <asp:Label ID="Label1" runat="server" Text="LISTA PRESUPUESTO" style="font-size: large; color: #960818"></asp:Label>
     
     </asp:Panel>
     
   <asp:Panel ID="Panel1" runat="server"   BackColor="white" GroupingText="Filtros de busqueda" >   
     <input id="idArchivoLoad" type="hidden" runat="server" />
   <asp:Panel ID="PanelButtom" runat="server"   class="ms-crm-Form-Body" >
     <table cellspacing="1" width="100%">
          <tr>
              <td width="70%">
              <table cellspacing="1"   width="100%">
          <tr>
         
<td width="100px"> Inicio:
    <cc2:PostTextBox ID="inicioDateTime" runat="server"  
        Width="70px" ></cc2:PostTextBox>
   
<asp:ImageButton runat="Server" ID="ImageButton2" 
                                        ImageUrl="~/Images/month.gif" 
                                        AlternateText="Click aqui para mostrar calendario" Width="16px" />
  <cc1:CalendarExtender ID="CalendarExtender1" 
                                       runat="server"  
                                       TargetControlID="inicioDateTime"
                                       PopupButtonID="ImageButton2"
                                       
                                       >
                        </cc1:CalendarExtender></td>
    
<td width="100px">Fin:

<cc2:PostTextBox ID="finDateTime" runat="server"  Width="70px"  
    ></cc2:PostTextBox>
                    <asp:ImageButton runat="Server" ID="ImageButton1" 
                                        ImageUrl="~/Images/month.gif" 
                                        AlternateText="Click aqui para mostrar calendario" Width="16px" />
                    <cc1:CalendarExtender ID="CalendarExtender2" runat="server" 
                                        TargetControlID="finDateTime"
                                        PopupButtonID="ImageButton1">
                     </cc1:CalendarExtender>
            </td>
            <td align="right" width="300px">
                <asp:Panel ID="Panel2" runat="server" BorderColor="ButtonHighlight">

               
                <asp:FileUpload ID="ExaminarFileUpload" runat="server" CompleteBackColor="Lime" 
                    ErrorBackColor="Red"  CssClass="ms-crm-List-Header"
                    OnClientUploadComplete="UploadComplete" OnClientUploadError="uploadError" 
                    OnClientUploadStarted="StartUpload" PersistedStoreType="Session" 
                    ThrobberID="Throbber" UploaderStyle="Traditional" UploadingBackColor="#66CCFF" 
                    ViewStateMode="Enabled" /><br />
                <asp:Button ID="Button2" runat="server"  CssClass="ms-crm-List-Header" 
                    onclick="ExaminarFileUpload_UploadedComplete" Text="Importar Excel S10" /> </asp:Panel>
            </td>
 </tr>
 </table>
 </td>
      <td>
 <table >
<tr>
<td><asp:Button ID="refreshButton" runat="server" Text="Actualizar" Width="150PX"   
        CssClass="ms-crm-List-Header" onclick="refreshButton_Click"   />
        
       

    <asp:LinkButton ID="LinkButton1" runat="server" Width="0px"></asp:LinkButton>
      <asp:LinkButton ID="LinkButton3" runat="server" Width="0px"></asp:LinkButton>
    <cc1:modalpopupextender id="ModalPartirPopupExtender" runat="server" 
        BackgroundCssClass="modalBackground"
      cancelcontrolid="btnCancelar" 
      dropshadow="True"
      okcontrolid="LinkButton3" 
      popupcontrolid="importParentPanel" 
      popupdraghandlecontrolid="importPanel"  
            targetcontrolid="LinkButton1" 
            DynamicServicePath="" 
          Enabled="True">
          </cc1:modalpopupextender> </td>
</tr>
<tr>
<td>
 <asp:Button ID="nuevoButton" runat="server" Text="Nuevo"  onclick="nuevoButton_Click"  Width="150PX" CssClass="ms-crm-List-Header"  />
</td>
</tr>
</table>
         
                  &nbsp;</td>
          </tr>
      </table>
        
      </asp:Panel>

      </asp:Panel>
   <hr />

    <asp:Panel ID="PanelBody" runat="server" BackColor="white" >
     <input id="idObra" name="idObra" type="hidden" runat="server" />
     <asp:UpdatePanel ID="grillaUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
       <uc2:PresupuestoListGrid ID="PresupuestoListGrid1" runat="server" DataSourceID="presupuestoListODS" />
        <asp:ObjectDataSource ID="presupuestoListODS"  runat="server"
             EnablePaging="True"
              SelectCountMethod="Count" 
              SortParameterName="sortExpression"
             SelectMethod="getPresupuestoList" 
             typeName="BOL.PresupuestoBL" >
               <SelectParameters>
                <asp:querystringparameter  Name="idObra" Type="Int32" querystringfield="idObra"  />
                <asp:ControlParameter Name="fechaInicio" Type="DateTime" ControlID="inicioDateTime"  />
                <asp:ControlParameter Name="fechaFin" Type="DateTime" ControlID="finDateTime"  />
                <asp:Parameter Name="startRowIndex" Type="Int32" />
                <asp:Parameter Name="maximumRows" Type="Int32" />
                <asp:Parameter Name="sortExpression" Type="String" />

                </SelectParameters>
               </asp:ObjectDataSource>
       
       </ContentTemplate>
       <Triggers>
       <asp:AsyncPostBackTrigger ControlID="refreshButton" />
       <asp:AsyncPostBackTrigger ControlID="btnSaveContinue" />
              </Triggers>
 </asp:UpdatePanel>
     </asp:Panel>

       
    <asp:Panel ID="importParentPanel" runat="server">
     <asp:Panel ID="importPanel" runat="server"
       Style="background-color:#DDDDDD;border:solid 1px Gray;color:Black"
       BorderStyle="Solid"
       BorderWidth="1"
       BorderColor="Transparent"
        ScrollBars="Auto"
        Direction="LeftToRight"
        Wrap="true"
               Width="550px" 
            
               backcolor="LightSteelBlue"
              
                 font-names="Arial"  >
<asp:UpdatePanel ID="importarUpdatePanel" runat="server" UpdateMode="Conditional"><ContentTemplate>

     
     <table width="100%">
    <tr  class=" ms-crm-List-Header ">
    <td colspan="2">
         <h2 style="color: #960818">IMPORTACION EXCEL  S10</H2>
        
       </td>
    </tr>
    <tr>
    <td align="right">Archivo:</td><td>

          
 <asp:Label ID="lblStatus" runat="server" Style="font-family: Arial; font-size: small;" 
            Font-Bold="True" ForeColor="#009900"></asp:Label>
            
        </td>
    </tr>
    <tr>
    <td align="right">Descripción:</td>
    <td>
        <cc2:PostTextBox ID="nombreTextBox" runat="server"  
            Width="280px"></cc2:PostTextBox>
       
        </td>
        
    </tr>
    <tr>
    <td align="right">Abreviación:</td>
    <td>
       
        <cc2:PostTextBox ID="abreviacionTextBox" runat="server"  Width="200px"  
            ></cc2:PostTextBox>
        </td>
        
    </tr>
  
   
    <tr>
    <td align="right">Moneda Presupuesto: </td><td>
    
        <cc2:DropDownCC ID="monedaInsertDropDownList" runat="server" Width="200px"  
             >
        </cc2:DropDownCC>
    
</td></tr><tr> 
    <td align="right">Tipo Cambio $:</td><td>
             <cc2:PostTextBox ID="tipoCambioLabel" runat="server" DataType="Double"  ReadOnly="true"
                  Width="200px"></cc2:PostTextBox>

</td></tr><tr>
    <td align="right">Fecha:</td>
    <td><asp:Label ID="fechaImportacionLabel"  runat="server" ></asp:Label>


</td></tr>

         <tr>
             <td align="right">
                 &nbsp;</td>
             <td>
                 &nbsp;</td>
         </tr>

         <tr class=" ms-crm-List-Header " >
             <td colspan="2">
                 <table width="100%">
                     <tr>
                         <td align="right" class="style2">
                             <asp:Button ID="btnSaveContinue" runat="server" CssClass="ms-crm-List-Header" 
                                 OnClick="btnSaveContinue_Click" 
                                 OnClientClick="return confirm('Usted quiere Guardar el Presupuesto S10?')" 
                                 Text="Importar Presupuesto" Width="150px" />
                         </td>
                         <td>
                             <asp:Button ID="btnCancelar" runat="server" CssClass="ms-crm-List-Header" 
                                 Text="Cancelar" Width="150px" />
                         </td>
                     </tr>
                 </table>
             </td>
         </tr>

</table>
     
    </ContentTemplate>
            </asp:UpdatePanel>
                 
    
     </asp:Panel>
     </asp:Panel>



    </form>
</body>
</html>
